﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Site1.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="BoxScore.jugador.Index" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="lateral1" runat="server">
    <img src="../css/images/Ballpark_7.png" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="lateral2" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="lateral3" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="contenido" runat="server">

<h2 class="title">Listado de Jugadores</h2>
    <div>
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
        <asp:TextBoxWatermarkExtender ID="TextBox3_TextBoxWatermarkExtender" 
            runat="server" Enabled="True" TargetControlID="TextBox3" WatermarkText="Busqueda por Nombre">
        </asp:TextBoxWatermarkExtender>
        <asp:Button ID="Button1" runat="server" Text="Buscar" onclick="Button1_Click" />
    </div>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True"  PageSize="20"
        AllowSorting="false" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:TemplateField SortExpression="picture">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("picture") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" AlternateText="Foto" Height="50px"
                        ImageUrl='<%# "~/Jugador/images/" +Eval("picture", "{0}") %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Nombre" SortExpression="first_name">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("first_name") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" 
                        NavigateUrl='<%# "~/Jugador/Detalle.aspx?jugador=" +Eval("id", "{0}") %>' 
                        Text='<%# Eval("first_name", "{0}") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="birth_date" HeaderText="Fecha de Nacimiento" Visible="false" 
                SortExpression="birth_date" />
            <asp:BoundField DataField="throwing_arm_string" HeaderText="Lanza" 
                SortExpression="throwing_arm_string" />
            <asp:BoundField DataField="batting_string" HeaderText="Batea" 
                SortExpression="batting_string" />
            <asp:BoundField DataField="status" HeaderText="Estatus" 
                SortExpression="status" />
        </Columns>
    </asp:GridView>



    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="getJugadores" TypeName="BoxScore.Model.BoxScoreBD">
    </asp:ObjectDataSource>



</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="resultados" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="proximos" runat="server">
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="publicidadAjena" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="publicidad" runat="server">
</asp:Content>
